﻿using project.B12.IService;
using project.B12.Model.Common;
using project.B12.Model.Enums;
using project.B12.Model.Models;
using software.Common.MVVM;
using Software.Common.Util.AppConfig;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Resources;
using System.Text;
using System.Threading.Tasks;

namespace project.B12.Service
{
    public class PublicResource : ObservableObject, IPublicResource
    {
        public PublicResource()
        {
        }

        public string? UserName { get; private set; }

        // 命令可用性改变
        public event EventHandler CommandUpdated;

        public virtual void OnCommandUpdate()
        {
            CommandUpdated?.Invoke(this, EventArgs.Empty);
        }

        public void ChangeUserName(string? name)
        {
            UserName = name;
        }
    }
}
